<!DOCTYPE html>
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title>animation</title>
    <style type="text/css">
        body {

         /*-webkit-perspective: 600; -moz-perspective: 600; -moz-perspective: 600;*/ }
       /* #ani, #an1, #an2, #an3 {
            width: 100px; height: 100px; background: #9cdff2;
            border-radius: 5px;
            -webkit-animation: mxhopacity 3s ease-in-out infinite normal;
            -moz-transform: translate3d(20px, 30px, 10px) rotateY(30deg);

             -o-transform: translate3d(20px, 30px, 10px) rotateY(30deg);
             -webkit-text-fill-color: transparent;
            -webkit-background-clip: text;
        }*/
        .ani{position: relative; -webkit-perspective: 1500; padding: 50px;  height: 300px;width: 700px; background: #9cdff2; }
        .ani div{width: 200px;height:150px; background: #A2BA49;position: absolute;
            box-shadow: 0 0 10px #abc inset,0 10px 15px #555;

        /*-webkit-mask-image:-webkit-gradient(linear, left top, left bottom, color-stop(0.25, transparent), color-stop(1.0, rgba(255, 255, 255, 0.5)))*/
        }
        .dong div{
            -webkit-transition: all 1s ease-in-out ;
        }
        .dong div:after{
             -webkit-transition: all 1s ease-in-out ;
        }
        .ani div:after{

            content: ' ';width: 200px;height: 150px;background: #A2BA49; display: block; top:150px; position: absolute;
            -webkit-mask-image:-webkit-gradient(linear, left top, left bottom , color-stop(0.25, transparent), color-stop(1.0, rgba(255, 255, 255, 0.5)));
            -webkit-transform:scaleY(-1);
            box-shadow: 0 0 10px #abc inset,0 10px 15px #000;
        }
        #an0 {
            left: 100px;
            z-index: 1;
             -webkit-transform:  rotateY(60deg)  ;
            background-image: url(http://img.topit.me/m/201012/23/12930885842603.jpg);
        }
        #an0:after{background-image: url(http://img.topit.me/m/201012/23/12930885842603.jpg);}
        #an1 {
            left: 150px;
            z-index: 2;
             -webkit-transform:  rotateY(60deg)  ;
            background-image: url(http://i2.topit.me/2/22/53/1117415796b3653222m.jpg);
        }
        #an1:after{   background-image: url(http://i2.topit.me/2/22/53/1117415796b3653222m.jpg);}
        #an2 {
            left: 300px;
            height: 200px;
            top:20px;
                background-image: url(http://i10.topit.me/m131/1013147684d455e108.jpg);
             
             -webkit-transform:  rotateY(0deg) ;
            z-index: 3;
        }
        #an2:hover{
            -webkit-transform:  rotateY(60deg) ;
             left: 150px;
        }
        #an2:after{
            z-index: 3;
            top:200px;
            background-image: url(http://i10.topit.me/m131/1013147684d455e108.jpg);
         }

        #an3 {
            left: 450px;
            z-index: 2;
            background-image: url(http://i10.topit.me/m124/10124247687b2f37a4.jpg);
             -webkit-transform:  rotateY(-60deg)  ;
        }
        #an3:after{background-image: url(http://i10.topit.me/m124/10124247687b2f37a4.jpg);}
        #an4 {

            left: 500px;
            z-index: 1;
             -webkit-transform:  rotateY(-60deg) ;
            background-image: url(http://i10.topit.me/m055/100554994672a38fc5.jpg);
        }
        #an4:after{background-image: url(http://i10.topit.me/m055/100554994672a38fc5.jpg);}

        @-moz-keyframes mxhopacity{
            0%,100% {
                margin-left:0;
            }
             25%{ margin-left:100px;}
             50%{ margin-left:200px;}
              
        }
        @-moz-keyframes mxhopacity1{
           0%,100% {
                background:#c3f;
           }
           25%{background:#9cdff2;}
           75%{background:#9cdff2;}

       }
        @-moz-keyframes mxhopacity2{
           0%,100% {

           }
           25%{background:#c3f;}
           50%{background:#9cdff2;}

       }
        @-moz-keyframes mxhopacity3{
           0%,100% {

           }

            25%{background:#9cdff2;}
           50%{background:#c3f;}
           75%{background:#9cdff2;}
       }


    </style>
</head>
<body>
<div class="ani" id="dong">
    <div id="an0"></div>
    <div id="an1"></div>
    <div id="an2"></div>
    <div id="an3"></div>
    <div id="an4"></div>
</div>

<script type="text/javascript">
    window.onload=function(){
        dong.className='ani dong';
    }
</script>
</body>
</html>